package com.tyqx.hashchainutil.org.app.config;

import java.io.File;
import java.nio.file.Paths;

public class Config {
	public static final String HOST_WORKING_DIR = "/mnt/hashchain_iscsi";
//    public static final String HOST_WORKING_DIR = "/home/zhangzhemin";
	public static final String DOCKER_PATH = "/usr/bin/docker";
	public static final String COMPOSE_PROJECT_NAME = "hashchain";
	public static final String baseUrl ="127.0.0.1";
	public static final String caBaseUrl ="tlsca.org1.hashchain.com";
	public static final String peer0Org1BaseUrl ="peer0.org1.hashchain.com";
	public static final String ORG1_MSP = "Org1MSP";
	public static final String ORG1 = "org1";
	public static final String ORG_MSP_1 = "Org1MSP";
	public static final String ORG_AFFI_1 = ORG1 + "." + COMPOSE_PROJECT_NAME + ".com";
	public static final String ORG2_MSP = "Org2MSP";
	public static final String ADMIN = "admin";
	public static final String ADMIN_PASSWORD = "adminpw";
	public static final String CHANNEL_CONFIG_PATH = "config/channel.tx";
	public static final String ORG_CA_MSP = "intermediaca";
	public static final String ORG_CA_TLS = "intermediatlsca";
	public static final String CA_MSP_URL_2 = ORG_CA_MSP + "2." + COMPOSE_PROJECT_NAME + ".com";
	public static final String CA_TLS_URL_2 = ORG_CA_TLS + "2." + COMPOSE_PROJECT_NAME + ".com";
	public static final String CA_MSP_TLS_FILE_2 = Paths.get(ORG_CA_MSP + "2", "tls-cert.pem").toAbsolutePath().toString();
	public static final String CA_TLS_TLS_FILE_2 = Paths.get(ORG_CA_TLS + "2", "tls-cert.pem").toAbsolutePath().toString();
	public static final String CA_MSP_ADMIN_2 = ADMIN + "2";
	public static final String CA_TLS_ADMIN_2 = ADMIN + "2";
	public static final String CA_MSP_ADMIN_PASSWORD_2 = ADMIN_PASSWORD + "2";
	public static final String CA_TLS_ADMIN_PASSWORD_2 = ADMIN_PASSWORD + "2";

	public static final String ORG_URL_1 = "org1." + COMPOSE_PROJECT_NAME + ".com";

	public static final String ORG1_USR_BASE_PATH = "crypto-config" + File.separator + "peerOrganizations" + File.separator
			+ "org1.hashchain.com" + File.separator + "users" + File.separator + "Admin@org1.hashchain.com"
			+ File.separator + "msp";
	
	public static final String ORG2_USR_BASE_PATH = "crypto-config" + File.separator + "peerOrganizations" + File.separator
			+ "org2.hashchain.com" + File.separator + "users" + File.separator + "Admin@org2.hashchain.com"
			+ File.separator + "msp";
	
	public static final String ORG1_USR_ADMIN_PK = ORG1_USR_BASE_PATH + File.separator + "keystore";
	public static final String ORG1_USR_ADMIN_CERT = ORG1_USR_BASE_PATH + File.separator + "admincerts";

	public static final String ORG2_USR_ADMIN_PK = ORG2_USR_BASE_PATH + File.separator + "keystore";
	public static final String ORG2_USR_ADMIN_CERT = ORG2_USR_BASE_PATH + File.separator + "admincerts";
	
	public static final String CA_ORG1_URL = "https://" + caBaseUrl + ":7054";
	

	public static final String ORDERER_URL = "grpcs://" + baseUrl + ":7050";
	public static final String ORDERER0_URL = "grpcs://" + baseUrl + ":7050";

	public static final String ORDERER_NAME = "orderer.hashchain.com";
	public static final String ORDERER0_NAME = "orderer0.hashchain.com";

	public static final String CHANNEL_NAME = "hashchainchannel";
	
	public static final String ORG1_PEER_0 = "peer0.org1.hashchain.com";
	
	public static final String ORG1_PEER_0_URL = "grpcs://" + ORG1_PEER_0+ ":7051";
	
	public static final String ORG1_PEER_1 = "peer1.org1.hashchain.com";
	
	public static final String ORG1_PEER_1_URL = "grpcs://" + baseUrl+ ":8051";
	
    public static final String ORG2_PEER_0 = "peer0.org2.hashchain.com";
	
	public static final String ORG2_PEER_0_URL = "grpcs://" + baseUrl+ ":9051";
	
	public static final String ORG2_PEER_1 = "peer1.org2.hashchain.com";
	
	public static final String ORG2_PEER_1_URL = "grpcs://" + baseUrl+ ":10051";
	
	public static final String CHAINCODE_ROOT_DIR = "chaincode";

	public static final String CHAINCODE_1_NAME = "mycc";

	public static final String HASHCHAIN_CHAINCODE_NAME = "hashchainmanage";

	public static final String CHAINCODE_1_PATH = "github.com/fabcar";
	
	public static final String CHAINCODE_1_VERSION = "1";


}
